package com.zuipin.service;

import java.util.List;
import java.util.Map;

import com.zuipin.entity.DeliveryAddress;
import com.zuipin.framework.exception.CustomException;
import com.zuipin.framework.result.Result;
import com.zuipin.util.Pagination;

/**
 * 收货地址接口
 * 
 * @ClassName: IDeliveryAddressService
 * @author wuyicheng
 * @time 2017年3月27日下午3:56:09
 */
public interface IDeliveryAddressService {
	
	public DeliveryAddress findById(Long id);
	
	public List<DeliveryAddress> findList(Long memberId, Long sysId, Pagination page);
	
	public void insert(DeliveryAddress deliveryAddress);
	
	public void update(DeliveryAddress deliveryAddress);
	
	public DeliveryAddress findDefault(Long memberId, Long sysId);
	
	/**
	 * @throws CustomException  
	 *
	 * @Title: deleteAddress 
	 * @author: wuyicheng
	 * @date: 2017年4月25日上午2:37:24 
	 * @param memberId
	 * @param sysId
	 * @param deliveryAddressId
	 * @param result
	 * @return
	 * @return: Result<Map<String,Object>>
	 * @throws 
	 */
	public Result<Map<String, Object>> deleteAddress(Long memberId, Long sysId,
			Long deliveryAddressId, Result<Map<String, Object>> result) throws CustomException;
	
	/** 
	 *
	 * @Title: findListByMemberIdAndSysId 
	 * @author: wuyicheng
	 * @date: 2017年4月25日上午9:37:10 
	 * @param deliveryAddress
	 * @param page
	 * @return
	 * @return: List<DeliveryAddress>
	 * @throws 
	 */
	public List<DeliveryAddress> findListByMemberIdAndSysId(DeliveryAddress deliveryAddress,
			Pagination page);
	
	/** 
	 *
	 * @Title: updateDeliveryAddress 
	 * @author: wuyicheng
	 * @date: 2017年5月12日下午4:10:19 
	 * @param deliveryAddress
	 * @throws CustomException
	 * @return: void
	 * @throws 
	 */
	void updateDeliveryAddress(DeliveryAddress deliveryAddress) throws CustomException;
	
}
